home *** CD-ROM | disk | FTP | other *** search
/ Power DOS 1996 July / Power DOS - July 1996.iso / sound / c_labs / patches / monolg.exe / README.NOW < prev    next >
Text File  |  1993-12-13  |  9KB  |  241 lines

  1. To install:
  2.  
  3.    Copy the MONOLOGW.EXE file to  c:\MONOLOGW directory.
  4. That's it.
  5.  
  6.  
  7. Now on to other information.
  8.  
  9.  
  10.                          Monologue for Windows
  11.  
  12.                            Version 1.7 OEM
  13.  
  14.                            October 29, 1993
  15.  
  16.                     Copyright (c) 1993, First Byte.
  17.  
  18. ----------------------------------------------------------------------
  19.  
  20.  
  21. This diskette contains an updated version of the Monologue speech
  22. accessory for Windows 3.1. It contains a single file MONOLOGW.EXE
  23. which should be copied over the version 1.5 OEM file of the same
  24. name. For a default Monologue installation, this file lives in
  25. the C:\MONOLOGW directory.
  26.  
  27.  
  28. Bugs fixed:
  29.  
  30. 1. Previous versions had problems when more than a couple K bytes of
  31. text were passed to Monologue through Clipboard or DDE. This version
  32. can handle a few pages worth of text at a time. (limit of about 15K).
  33.  
  34. 2. Previous version sometimes had problems when a period was
  35. encountered.  This has been fixed.
  36.  
  37. 3. This version of Monologue will speak "in the background" while
  38. other Windows applications are active. Speech can be halted by
  39. clicking on the minimized Monologue Icon with either the right or
  40. left mouse button while speech is in progress.
  41.  
  42.  
  43.  
  44. -----------------------------------------------------------------------------------------
  45.  
  46.  
  47. A Short Guide to Programming the First Byte Speech Engine
  48.                       
  49.                     
  50.             Copyright 1993, Creative Labs, Inc.
  51.  
  52.  
  53. There are three commands that you need to be familiar with
  54. when including text-to-speech capability to your Windows 3.1
  55. programs.  They are:
  56.      For C:
  57.        long FAR PASCAL OpenSpeech(HWND hWnd, WORD mode, LPSTR voicetype);
  58.  
  59.        int  FAR PASCAL Say(long SCB, LPSTR lpText);
  60.  
  61.        void FAR PASCAL CloseSpeech(long SCB);
  62.     
  63.  
  64. In Microsoft's Visual Basic, you need to make the following declarations:
  65.  
  66.    Declare Function OpenSpeech Lib "\monologw\fb_spch.dll" (ByVal hWnd%, ByVal mode%, ByVal voicetype$) As Long
  67.  
  68.    Declare Function CloseSpeech Lib "\monologw\fb_spch.dll" (ByVal lpSCB&) As Integer
  69.  
  70.    Declare Function Say Lib "\monologw\fb_spch.dll" (ByVal lpSCB&, ByVal phrase$) As Integer
  71.  
  72. For C++ programmers, please bear in mind that you need to declare these 
  73. functions inside an extern "C" declaration.
  74.  
  75. 1) OpenSpeech
  76.  
  77. This function is used to initialize the text-to-speech interface and
  78. must be invoked before the Say function is used.  By default, the function
  79. uses a "speech font" called FB_11K8.  hWnd and node are usually set to zero.
  80. OpenSpeech returns a long integer called the Speech Control Block.  This 
  81. value is used later in the Say and CloseSpeech functions.  Thus, the function
  82. is expressed as:
  83.  
  84. long lSCB
  85. lSCB = OpenSpeech(0, 0, NULL);
  86.  
  87. For programmers using Visual Basic, the speech font must be defined, since 
  88. "NULL" is not defined.  Depending on which file is available in the MONOLOGW directory
  89.  
  90.   The statement should thus read:
  91.  
  92. DIM lSBC as LONG
  93. DIM xxx as Variant
  94.  
  95. lSCB = OpenSpeech(0, 0, "FB_11K8");
  96.    or
  97. lSCB = OpenSpeech(0, 0, "FB_22K16);
  98.  
  99. FB_11K8  is used for 8 bit speech.  This is the will work with all the sound blaster cards.
  100. FB_22K16 is used for 16 Bit speech.  Only for 16 bit cards.
  101.  
  102.  
  103. 2) Say
  104.  
  105. Say is the function used to actually translate the text over to spoken 
  106. words.  It returns a value of 0 if no error is found.  The parameters that
  107. it takes are the Speech Control Block and the string containing the text you
  108. want to have read back.  For example:
  109.  
  110. Say(lSCB, "Hello world!");
  111.  
  112. Visual Basic:
  113.  
  114. xxx = Say(lSCB, "Hello World!")
  115.  
  116. NOTE: Visual Basic and Windows.
  117.     You Should Give time for the Speech function to initailize befor allowing it to process
  118.     the SAY command.  ie a time out function, a mouse click FormLoad,..ect.
  119.     Same applies for windows.  The Say Command needs to be tied to an event or timer or button.
  120.     For example, if the SAY command is  Called too soon, you may get a message telling
  121.     that the wave device is not ready.  or similar things.  So please at least have a start
  122.     button or form load  befor calling the first SAY. You could start up a timer, and then
  123.     allow an amount of time to pass befor allow the say command to be processed.
  124.  
  125. Modifications can be made to change the pitch, volume, and speed of the 
  126. spoken output.  A series of symbols are used inside the string to accomplish
  127. this.  These are:
  128.  
  129. [       Shortens the phoneme that follows.  Cummulitive
  130. ]       Lengthens the phoneme that follows. Cumulitive ie ]]] 
  131. /       Increases pitch by 20%.
  132. '       Increases pitch by 30% and lengthens the phoneme that follows.
  133. "       Increases pitch by 20% and lengthens the phoneme that follows.
  134. -       Decreases pitch by 30% and shortens the phoneme that follows.
  135. Pn      Global (one digit) Sets pitch to value between 0 and 9. (default is 5)
  136.             negitive values work ie -1 -2 -3 ...  but be carfull, if to long
  137. Sn      Global (one digit) Sets speed to value between 0 and 9. (default is 5)
  138. Vn      Global (one digit) Sets volume to value between 0 and 9. (default is 5)
  139.  
  140. These symbols must be enclosed inside a pair of brackets and Tilde, like this:'<<~' and '>>'.
  141.  
  142. As an example, we can increase the speed by writing the following:
  143.  
  144. Say(lSCB, "<<~S8>> Hello World");
  145.  
  146. You will no doubt notice that the speech engine will not always pronounce 
  147. words as you would like them to.  First Byte has thus provided a list of  
  148. their phonetic code and modifiers.  The phoneme is CASE sensitive and in  the Examples,
  149. the capitalized letters are the sounds they represent.
  150.  
  151.   For the benefit of those of you who did not receive a list of these phonetics,
  152. it is provided below:
  153.  
  154. Phoneme         Example         Phoneme         Example
  155. _______________________________________________________
  156. IY              bEEt       |    y               Yes
  157. IH              bIt        |    r               Red
  158. IX              dEcide     |    w               Wed
  159. EH              bEt        |    b               Bed     
  160. AE              bAt        |    d               DeaD     
  161. AH              bUt        |    g               Get
  162. AX              About      |    v               Vet
  163. AA              cOt        |    DH              THen
  164. UH              bOOk       |    z               Zen
  165. UW              bOOt       |    ZH              uSual
  166. OW              bOAt       |    f               Fit
  167. ER              bIRd       |    TH              THin
  168. AY              bIte       |    s               Sin
  169. EY              bAIt       |    SH              SHin
  170. OY              bOY        |    h               Him
  171. AW              bOUt       |    p               Pin 
  172. LX              faLL       |    PX              sPin
  173. I               Low        |    t               Top
  174. m               Mow        |    TX              sTop
  175. n               No         |    DX              buTTer
  176. NG              siNG       |    k               Kite
  177.                            |    KX              sKy
  178.  
  179. So, if you wanted to say "Rhinoceros" using Phonemes, you would program:
  180.  
  181. Say(lSCB, "<<~rIHn'AAsER-AHs>>");
  182.  
  183. This is only an example, you may adjust the phonemes to your liking, or allow the Speach Engin 
  184. to dicide how to pronounce the word.
  185.  
  186.  
  187. It may take some experimentation to get a pronunciation that is close to 
  188. your regional accent.
  189.    If you use MONOLOG in windows, the Dictionary (an exception dictionary) 
  190. shows the phonetics for the words inserted in it.
  191.  
  192. 3) CloseSpeech
  193.  
  194. One you have finished using the text-to-speech interface, simply use
  195. the CloseSpeech function.  It does return a value. 0 if successfull, -number if failed.
  196. The only parameter it takes is the Speech Control Block. For example, we can have:
  197.  
  198. CloseSpeech(lSCB);
  199.  
  200. You must use CloseSpeech befor exiting.  If you don't, the speech engin will continue
  201. to take up memory.
  202.  
  203.  
  204. 4) Linking with the DLL
  205.  
  206. The dynamic link library that is used is called FB_SPCH.DLL (a mistake was
  207. made in our manual in which the DLL listed was called SPEECH.DLL).  In order
  208. to use the above functions, you need to import them in your definition
  209. file (the .DEF file).  At the end of the file, simply enter the following:
  210.  
  211. IMPORTS
  212.         FB_SPCH.CLOSESPEECH
  213.         FB_SPCH.OPENSPEECH
  214.         FB_SPCH.SAY
  215.  
  216.  
  217.  
  218. using DDE:
  219. At this time, We at AUG in Creative Labs Tech Support  don't have a lot of 
  220. information regarding DDE usage.  But here is at least one example.
  221.  
  222.   DDE that uses monolog in window with MS WORD 2.0.
  223.  
  224. Create a macro with the following:
  225.  
  226. SUB Main
  227.   TextString$ = Selection$()
  228.   ChnNum = DDEInitiate("MONOLOG", "TALK")
  229.   if ChnNum = 0 then
  230.     MsgBox "Monolog is either not running or not in DDE server mode", "Macro Error"
  231.     Goto Finish
  232.   End If
  233.   DDEPoke ChnNum, " ", TextString$
  234.   DDETerminate ChnNum
  235.   Finish: 'End Label
  236. End Sub
  237.  
  238. ----------------------------------------------------------------------------
  239.  
  240. First Byte and Monologue for Windows are both trademarks of First Byte, Inc.
  241.